UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/GVDrkR/o/4mmqzN8mmbZSEch/3YJugl2fC2ao2HGF0='
WHERE
key_id = '046210a74682670a4f01a4b08ec90569fe192ec34e7553c4aaeee21b9b32882d'
AND (
token = '/GVDrkR/o/4mmqzN8mmbZSEch/3YJugl2fC2ao2HGF0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)