UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e4KpvxkcqzSg1J5gKj/jUenVWgNV6QcNX1GGO3/T7fE=' 
WHERE 
  key_id = '98b270185222d60655c8736f1c7e23f3ed5816b842b47c6433617813cf4af428' 
  AND (
    token = 'e4KpvxkcqzSg1J5gKj/jUenVWgNV6QcNX1GGO3/T7fE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033