UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lGAsJPLaG1PE6txF5U3lop5DAEpZsPwBgiggyrGZ/+0='
WHERE
key_id = '344a5684590990d17775eec3e4db34980aa0325148db379dc683cf2dddffc8da'
AND (
token = 'lGAsJPLaG1PE6txF5U3lop5DAEpZsPwBgiggyrGZ/+0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)