UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rPDiWx0zR0H74Nyg2C8DKmz4G3Ne+zzNJKbqF1/OU/k='
WHERE
key_id = '5e2bd9f6c4ff5b856371773620c9437469df7e6be50054bec34bd0e48cf8284e'
AND (
token = 'rPDiWx0zR0H74Nyg2C8DKmz4G3Ne+zzNJKbqF1/OU/k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)