UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+wuyhRjCe+hWdBu2B+j22YuuEQ0h3dtPz+1e/ww2+Us='
WHERE
key_id = '7cb4c3cf4956c8aebef7c40a519d46e795d5396fa167040c7e1f8a2ceec7b80c'
AND (
token = '+wuyhRjCe+hWdBu2B+j22YuuEQ0h3dtPz+1e/ww2+Us='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)