UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iXa/dJQ47zVtRLIKZGd+kGMXHuq7vfgspNYQDt7DutU=' 
WHERE 
  key_id = '15f7c658cab227d4233fc0ca1428f656c66de29ff5b3870be9d06a929f72cbd3' 
  AND (
    token = 'iXa/dJQ47zVtRLIKZGd+kGMXHuq7vfgspNYQDt7DutU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050