UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'baCp9UjRw06YHieXFsqMw+/VD71EM6+Pa7r1gAxgeEY=' 
WHERE 
  key_id = 'fc6405bd91c6acd3a21b418f99d3642356695d39dab53001359ddb8cd06db9e5' 
  AND (
    token = 'baCp9UjRw06YHieXFsqMw+/VD71EM6+Pa7r1gAxgeEY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014