UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OOV6UQXzcFnif/kL8Dd3j56vwb2aLbqy6067BT58zvQ='
WHERE
key_id = '55ea0b4e3ac9b2c91787e360af09116da7732a5232129ed3cfd677e61860cc58'
AND (
token = 'OOV6UQXzcFnif/kL8Dd3j56vwb2aLbqy6067BT58zvQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)