UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yQr/sv3giPbBMDPMcYWSnPUjVMNR9p/3+dxAofvhH7w='
WHERE
key_id = '6bce66a40327206050b76d51d9b9d82818176945a2ec3ae8dc430ebe64c43613'
AND (
token = 'yQr/sv3giPbBMDPMcYWSnPUjVMNR9p/3+dxAofvhH7w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)