UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ElmmFgsSKpvsaYJLb+sLDNy8tlwufMqPSGsfhVhq/N4='
WHERE
key_id = 'dc101eec5b5711d3158b5f715136100f505d488d36d50b9489419b06ffe68501'
AND (
token = 'ElmmFgsSKpvsaYJLb+sLDNy8tlwufMqPSGsfhVhq/N4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)