UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '90hVk+vl0FJFTCQ6Xcsh6cm2L2ZBKQNn46tnyvCqewQ='
WHERE
key_id = '730e076c1256054012fe899fbc7dd92f9099b68efd6005094b090b93a88f8bfe'
AND (
token = '90hVk+vl0FJFTCQ6Xcsh6cm2L2ZBKQNn46tnyvCqewQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)