UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FaizeX/blFp88mmXEq9jIVt4AAqAQEjnioQySLJZLlk='
WHERE
key_id = 'f8107c2ada670c67dd2bf70b7f437a4b99b262295d3cd7060f11335660f91c73'
AND (
token = 'FaizeX/blFp88mmXEq9jIVt4AAqAQEjnioQySLJZLlk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)