UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LTA0YHEnOJiLhP7ij+UMje7uWz4RweNQqXEPshbhTok=' 
WHERE 
  key_id = '182995df6e672c813fbf0748a3cb81f17199acff2fdcea106f24de4e7250868d' 
  AND (
    token = 'LTA0YHEnOJiLhP7ij+UMje7uWz4RweNQqXEPshbhTok=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00108