UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uSw3P2MSr35uTIjXDSkchxAtM5kzyV/xNYf7KywmesI='
WHERE
key_id = '33255cd6991542871661fb0d9c847979b462fd0dd56f1fd74ceb535deae1d7ae'
AND (
token = 'uSw3P2MSr35uTIjXDSkchxAtM5kzyV/xNYf7KywmesI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)