UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'NQ2JzQ70Z6rWsBgkFCkYNQy+p+NQecrFSvuY2IL1Qqg=' 
WHERE 
  key_id = 'ec66307990f15ce1bef4e4cb1ce719fdb2341524f0df0b56daeac694d7fe20ca' 
  AND (
    token = 'NQ2JzQ70Z6rWsBgkFCkYNQy+p+NQecrFSvuY2IL1Qqg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033