UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zuGCsTzzXex0BbHlnR9wp4m9SiNcKTcyjjZQVFMz+/Q='
WHERE
key_id = '1e8d4565df1ee9740f1db3585159054dc4d87340fc55fe95c45dc08ce4d475f9'
AND (
token = 'zuGCsTzzXex0BbHlnR9wp4m9SiNcKTcyjjZQVFMz+/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)