UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uw/Vm1W/Asa7rMV1iCtYyQAWb9fqz0b/Nx/ZzzOwE28='
WHERE
key_id = 'e7eef430217c86cc691b016617d24a30cd0000da493805e3525db299ee91be88'
AND (
token = 'uw/Vm1W/Asa7rMV1iCtYyQAWb9fqz0b/Nx/ZzzOwE28='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)