UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zTERDQsGiOWfn6qxL+Q5f/uoOnzXbNoIFEq4MKbdH1c=' 
WHERE 
  key_id = 'db6192907db2fe398b07fbdd627bcb73424ea45f9e75e9d02ef3929682520da3' 
  AND (
    token = 'zTERDQsGiOWfn6qxL+Q5f/uoOnzXbNoIFEq4MKbdH1c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024