UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'shnO5jfOHbv92RlOGtZ8DPBaRELRi+et9zVMuzpMraQ='
WHERE
key_id = '19019767bc74a0ecf3d4b8c0bf3bb3c748727c97f99b7cabc69b8725b5e73e20'
AND (
token = 'shnO5jfOHbv92RlOGtZ8DPBaRELRi+et9zVMuzpMraQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)