UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/OojnRgsf/fBU3k7zfKloCsRCd6KHAYL+2q52K7O6y0=' 
WHERE 
  key_id = 'ef8d25cbb56c739b44651a7fccf790d2e3d5d8528e5a330f00ea9c97d4b1b959' 
  AND (
    token = '/OojnRgsf/fBU3k7zfKloCsRCd6KHAYL+2q52K7O6y0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030