UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WDlpXTZkfe34dEXNAJgfb/8UL1hzf8jtP/iXLYcyyDw='
WHERE
key_id = '5900be62947c4a3b0acd2f06f4a067aa684580e2c4e5e7c5f98b9effcfe2e841'
AND (
token = 'WDlpXTZkfe34dEXNAJgfb/8UL1hzf8jtP/iXLYcyyDw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)