UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jg3ldIWN0UUahBF3g/hayQZAeqOzzRByVXIC4GWZRwA='
WHERE
key_id = '22e9e6340547a1886e85a6ff3b1120bd08a80aa7b53ceead24bc55cc50cf927f'
AND (
token = 'jg3ldIWN0UUahBF3g/hayQZAeqOzzRByVXIC4GWZRwA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)