UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3EWbvVpUSNbbZq6eSbzmH4Ece/Ai9IB9UqHb/0/vnKE=' 
WHERE 
  key_id = 'e5bbb8b21bb67d214338bc17ea4afe8942efb29fe96c74ab8f1bd85a9e33f3db' 
  AND (
    token = '3EWbvVpUSNbbZq6eSbzmH4Ece/Ai9IB9UqHb/0/vnKE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029