UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JJ/1/pAbpLNS4ZhN6cZW4mYu1/oRfPZv9BtJtxJJXhY=' 
WHERE 
  key_id = 'f98ec60675f94a86c5d7a2e1350c57ab63a5e97bb88fa47b4632cae701eb9e6e' 
  AND (
    token = 'JJ/1/pAbpLNS4ZhN6cZW4mYu1/oRfPZv9BtJtxJJXhY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041