UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EWDoDXobP/a0+X0DKV/lb08gT0zU5hRLdtMMGW28MzA='
WHERE
key_id = '43d0eee79231888896c1c3d3f5de77553dd991258fc2e571fd245ae75a2b4212'
AND (
token = 'EWDoDXobP/a0+X0DKV/lb08gT0zU5hRLdtMMGW28MzA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)