UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '79U8Z+rI2+QhiSdvYVYcbP20pHal8lDX/MtM6YmJl2k='
WHERE
key_id = '473537aedf5cf3a1520a6f88f31cb51cdf721e897480f6f2090ac6eeacaa7ffc'
AND (
token = '79U8Z+rI2+QhiSdvYVYcbP20pHal8lDX/MtM6YmJl2k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)