UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DLsr6SOiqn8bCRl2u53SzXecKG/WYYbUt1/1VfXzX2I='
WHERE
key_id = '3be4a1221fc189e850067da1b617d3f744050b54004d3ce1eed7b3126101c883'
AND (
token = 'DLsr6SOiqn8bCRl2u53SzXecKG/WYYbUt1/1VfXzX2I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)