UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ziT09rz3QTho5SYSzQx/otV0cq0JAAsR9PGy747vs8='
WHERE
key_id = '4163fcac10d9bbf7bfab1c33aeee1ee0756c8c48cba722b7ced3cc9edeacc255'
AND (
token = '+ziT09rz3QTho5SYSzQx/otV0cq0JAAsR9PGy747vs8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)