UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IEQM/aInAhr6xkHpLyblNVcJRJe5PQsF9JyAaErWxAw='
WHERE
key_id = '88970759fcb89ce516ec09f1d6953c4ed29f2ee4af63aafaabf1c7157787957f'
AND (
token = 'IEQM/aInAhr6xkHpLyblNVcJRJe5PQsF9JyAaErWxAw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)