UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '420dapZP/YP1MCoS/T0elkNvXk3Y9nhXD9/ITIQpeNE='
WHERE
key_id = '4b7751867abe7eec784cda254b8452037a1c0ecc99eb9295ee564f32af2384a0'
AND (
token = '420dapZP/YP1MCoS/T0elkNvXk3Y9nhXD9/ITIQpeNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)