UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm3u8fRsJJx/Jk2d0ZPv5JVOPRzUWuQDK/DPQlUDSI8Q='
WHERE
key_id = '61d35317678dfc56e704a70634a6151aec6473546c998864d3672bb90d68052d'
AND (
token = 'm3u8fRsJJx/Jk2d0ZPv5JVOPRzUWuQDK/DPQlUDSI8Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)