UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HHwrRy1NZve2WTCm+cXEZSweKWvKsb8TFaD7/Y0igq4=' 
WHERE 
  key_id = '5b95bae948610521084ee1c3e22ebe89d1f166791b78905eeb4cd0135e9925ef' 
  AND (
    token = 'HHwrRy1NZve2WTCm+cXEZSweKWvKsb8TFaD7/Y0igq4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020