UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'la60roGrEaMf55aw9/ufWsfDhW74PsDIvW/J6GmVqbE='
WHERE
key_id = '864ffcc87f1d5aa7ba34cfd4120d81e0a67a4e23bc1d297220b4794481351eac'
AND (
token = 'la60roGrEaMf55aw9/ufWsfDhW74PsDIvW/J6GmVqbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)