UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'x2RYP349ZmhVTkE53vWlG7JLprh9iTTJhFNykLIhBhA=' 
WHERE 
  key_id = '05268e3453008833077d120e706a48d960010e7d01044f793db3b6c9c3ca8b97' 
  AND (
    token = 'x2RYP349ZmhVTkE53vWlG7JLprh9iTTJhFNykLIhBhA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022