UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LlmkAZBBrLvQ+hR9XOQyqLo8u2JvGfeduXQO5pG1OP8='
WHERE
key_id = '61af7c65ae47c066a02cc5af5b3d1c28a8e9cae76fda74172018c809b6facfb5'
AND (
token = 'LlmkAZBBrLvQ+hR9XOQyqLo8u2JvGfeduXQO5pG1OP8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)