UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h6vZ5UjVa2ynzxJPZ5BbkEmDkrXaah6O+bqMtofJkdQ='
WHERE
key_id = '9c5d705f68a9d46b80471c8fadd64ffcfc2afda3fcda9a03e0ba70aef3975a4c'
AND (
token = 'h6vZ5UjVa2ynzxJPZ5BbkEmDkrXaah6O+bqMtofJkdQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)