UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Eym1FMGAEnUgRZEZzzNgfGvVTiEvLM8WUbXci+UNoOU='
WHERE
key_id = '5dd269c9483a6b4e70390f9b1a38b5644a433f9412ff2935cc7b1eba54a32fdd'
AND (
token = 'Eym1FMGAEnUgRZEZzzNgfGvVTiEvLM8WUbXci+UNoOU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)