UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1UZVw27FqRThqnZh0RWi4k818cxPuPeu1Id9ObbRgEQ='
WHERE
key_id = '67b61c1d31da9c85ec290c747815f07335d28433700eda9522ab65a17f96fcd1'
AND (
token = '1UZVw27FqRThqnZh0RWi4k818cxPuPeu1Id9ObbRgEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)