UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RmwY73/xqdP5859jXgO+p0ZDLUyDmk2J8ZPnNI4SFHk=' 
WHERE 
  key_id = 'c01cd331ede56c250f9b017ea2f722b49bad75445e212726f87de8431ab52f66' 
  AND (
    token = 'RmwY73/xqdP5859jXgO+p0ZDLUyDmk2J8ZPnNI4SFHk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051