UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/s4XEM3d+lC1dcQ2FKxPKZivZ7U3MYQgON2enPhrfKo=' 
WHERE 
  key_id = '9bacd08cb8428dc3836190dc0822f56e6a56688f8dba58ef2b4ac3a4c50b4e39' 
  AND (
    token = '/s4XEM3d+lC1dcQ2FKxPKZivZ7U3MYQgON2enPhrfKo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00106