UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2w8Yhvf9PKjd8eb927KoiT670fz3ea5uQwVqBCLAIIY='
WHERE
key_id = 'da6ab7c0fe21753529fd5d875dfd9c9527c251e55c91af73305567d4fc8eeeb2'
AND (
token = '2w8Yhvf9PKjd8eb927KoiT670fz3ea5uQwVqBCLAIIY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)