UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'B83T9/ReO9QhWWSaMlCly2q5A4K2Mn2Ngz/eDsnnsLA=' 
WHERE 
  key_id = '10b9941dbb22d9d66fadef7a719c659b943eb0798b2ada259bd197e9a5a525b2' 
  AND (
    token = 'B83T9/ReO9QhWWSaMlCly2q5A4K2Mn2Ngz/eDsnnsLA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026