UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8pxhjkgxhw1JdsLDyvMTAOyOBAj5NOFlo+uk7OZOrPw=' 
WHERE 
  key_id = 'f26be1f9c2825c010a61fd267ec0bef65c84eb6fe43b514767d107d231c9af32' 
  AND (
    token = '8pxhjkgxhw1JdsLDyvMTAOyOBAj5NOFlo+uk7OZOrPw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021