UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jhEzf+FKdScRhRnpi9jIeT0Bgs64OomSbc8uRWKUaaI='
WHERE
key_id = '92f184ca2dc17511477c0e547b362e592bd7223fa1aeabf3c6cc52041d9b0a8c'
AND (
token = 'jhEzf+FKdScRhRnpi9jIeT0Bgs64OomSbc8uRWKUaaI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)