UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LDCsjqLp+JFrgImjAWmZhu03pGS/4f2qA/qL/ChDY18=' 
WHERE 
  key_id = '0cbb37f6454c5e07c9672839a377669442f09e9cdd916c3d85d7fcc62014ad2e' 
  AND (
    token = 'LDCsjqLp+JFrgImjAWmZhu03pGS/4f2qA/qL/ChDY18=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032