UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WrvK3xUyI2d2vp6QfFc7n4+BU+MmQQlWG8Pvdc+Dew4='
WHERE
key_id = 'fdcbb8ab9a2c7270f75d64ac47424a8da07444767ef36087b0c3783be5c45edb'
AND (
token = 'WrvK3xUyI2d2vp6QfFc7n4+BU+MmQQlWG8Pvdc+Dew4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)