UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cpum20c0Go9ZFhyEKjB8DZkt7+x/3nMp9z2x3nl6ORE='
WHERE
key_id = '30afe8474b9d7347c0653a58575ae1757f03042f9190ac7e2722123e1c294e76'
AND (
token = 'Cpum20c0Go9ZFhyEKjB8DZkt7+x/3nMp9z2x3nl6ORE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)