UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'NmQYZ4TxLR3bT4y3Y0/MzxCVcIG1uCzLJpf+SPlH6iw=' 
WHERE 
  key_id = '9fd85dd08fb43ba0d4b8236046bc7a47bcc84a68dc8e43cc0a4a8a0fcbd6578a' 
  AND (
    token = 'NmQYZ4TxLR3bT4y3Y0/MzxCVcIG1uCzLJpf+SPlH6iw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035