UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jKtGo8HD7Wz4BYKCuwV7n8TFsBqQidoKhH8eCxgg/FA='
WHERE
key_id = '67afe1e0d1e7b3e3a293a7e1168b8b8aa3387ffc316037ad6ba16dcff9650bf6'
AND (
token = 'jKtGo8HD7Wz4BYKCuwV7n8TFsBqQidoKhH8eCxgg/FA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)