UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PuVoNy+nBLXMJSirNQa/td109PvzuwhgmdZLvPSzs5k='
WHERE
key_id = '873458bae5b25a259628ccedb86264ee9c393831ee95f3fbb2232831f4430885'
AND (
token = 'PuVoNy+nBLXMJSirNQa/td109PvzuwhgmdZLvPSzs5k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)