UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wa14dkJWv6n8tZzlw9MusJwu/FYne/4wzye5Xh4444I=' 
WHERE 
  key_id = 'ac2f67175e0ecd92b4f0610e012f0fe93d66806c02c4fcca445beea672aa0956' 
  AND (
    token = 'Wa14dkJWv6n8tZzlw9MusJwu/FYne/4wzye5Xh4444I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033