UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kVDu3vPDzprwZeuB6CWxnAEz6rB4SKdTgwrQ3Tv1MZA='
WHERE
key_id = '7db9e5e47d6374a4eb4cf09918e0b1240762b57481ffb7bbc64473f069261b59'
AND (
token = 'kVDu3vPDzprwZeuB6CWxnAEz6rB4SKdTgwrQ3Tv1MZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)